package com.by.common.utils;

import org.springframework.stereotype.Component;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

@Component
public class DateUtils {
    public static String getSystemTimeYM(){
        LocalDate localDate = LocalDate.now();
        //格式化
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yMM");
        String tmp = localDate.format(formatter);
        tmp = tmp.substring(2);
        return tmp;
    }

}
